\(\int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx\) [757]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 42 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {a+b x} \sqrt {a c-b c x}}{a \sqrt {c}}\right )}{a \sqrt {c}} \]

[Out]

-arctanh((b*x+a)^(1/2)*(-b*c*x+a*c)^(1/2)/a/c^(1/2))/a/c^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {94, 214} \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {a+b x} \sqrt {a c-b c x}}{a \sqrt {c}}\right )}{a \sqrt {c}} \]

[In]

Int[1/(x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]),x]

[Out]

-(ArcTanh[(Sqrt[a + b*x]*Sqrt[a*c - b*c*x])/(a*Sqrt[c])]/(a*Sqrt[c]))

Rule 94

Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))), x_Symbol] :> Dist[b*f, Subst[I
nt[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sqrt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] &&
 EqQ[2*b*d*e - f*(b*c + a*d), 0]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rubi steps \begin{align*} \text {integral}& = b \text {Subst}\left (\int \frac {1}{-a^2 b c+b x^2} \, dx,x,\sqrt {a+b x} \sqrt {a c-b c x}\right ) \\ & = -\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b x} \sqrt {a c-b c x}}{a \sqrt {c}}\right )}{a \sqrt {c}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.81 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\frac {\sqrt {a-b x} \left (\log \left (-1+\frac {\sqrt {a+b x}}{\sqrt {a-b x}}\right )-\log \left (a+\frac {a \sqrt {a+b x}}{\sqrt {a-b x}}\right )\right )}{a \sqrt {c (a-b x)}} \]

[In]

Integrate[1/(x*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]),x]

[Out]

(Sqrt[a - b*x]*(Log[-1 + Sqrt[a + b*x]/Sqrt[a - b*x]] - Log[a + (a*Sqrt[a + b*x])/Sqrt[a - b*x]]))/(a*Sqrt[c*(
a - b*x)])

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(78\) vs. \(2(34)=68\).

Time = 0.60 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.88

method result size
default \(-\frac {\sqrt {b x +a}\, \sqrt {c \left (-b x +a \right )}\, \ln \left (\frac {2 a^{2} c +2 \sqrt {a^{2} c}\, \sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}}{x}\right )}{\sqrt {c \left (-b^{2} x^{2}+a^{2}\right )}\, \sqrt {a^{2} c}}\) \(79\)

[In]

int(1/x/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-(b*x+a)^(1/2)*(c*(-b*x+a))^(1/2)*ln(2*(a^2*c+(a^2*c)^(1/2)*(c*(-b^2*x^2+a^2))^(1/2))/x)/(c*(-b^2*x^2+a^2))^(1
/2)/(a^2*c)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 110, normalized size of antiderivative = 2.62 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\left [\frac {\log \left (-\frac {b^{2} c x^{2} - 2 \, a^{2} c + 2 \, \sqrt {-b c x + a c} \sqrt {b x + a} a \sqrt {c}}{x^{2}}\right )}{2 \, a \sqrt {c}}, -\frac {\sqrt {-c} \arctan \left (\frac {\sqrt {-b c x + a c} \sqrt {b x + a} a \sqrt {-c}}{b^{2} c x^{2} - a^{2} c}\right )}{a c}\right ] \]

[In]

integrate(1/x/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="fricas")

[Out]

[1/2*log(-(b^2*c*x^2 - 2*a^2*c + 2*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*a*sqrt(c))/x^2)/(a*sqrt(c)), -sqrt(-c)*arc
tan(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*a*sqrt(-c)/(b^2*c*x^2 - a^2*c))/(a*c)]

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 12.78 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.98 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=\frac {i {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4}, 1 & 1, 1, \frac {3}{2} \\\frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2} & 0 \end {matrix} \middle | {\frac {a^{2}}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} a \sqrt {c}} - \frac {{G_{6, 6}^{2, 6}\left (\begin {matrix} 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 1 & \\\frac {1}{4}, \frac {3}{4} & 0, \frac {1}{2}, \frac {1}{2}, 0 \end {matrix} \middle | {\frac {a^{2} e^{- 2 i \pi }}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} a \sqrt {c}} \]

[In]

integrate(1/x/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

I*meijerg(((3/4, 5/4, 1), (1, 1, 3/2)), ((1/2, 3/4, 1, 5/4, 3/2), (0,)), a**2/(b**2*x**2))/(4*pi**(3/2)*a*sqrt
(c)) - meijerg(((0, 1/4, 1/2, 3/4, 1, 1), ()), ((1/4, 3/4), (0, 1/2, 1/2, 0)), a**2*exp_polar(-2*I*pi)/(b**2*x
**2))/(4*pi**(3/2)*a*sqrt(c))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.12 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {\log \left (\frac {2 \, a^{2} c}{{\left | x \right |}} + \frac {2 \, \sqrt {-b^{2} c x^{2} + a^{2} c} a \sqrt {c}}{{\left | x \right |}}\right )}{a \sqrt {c}} \]

[In]

integrate(1/x/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="maxima")

[Out]

-log(2*a^2*c/abs(x) + 2*sqrt(-b^2*c*x^2 + a^2*c)*a*sqrt(c)/abs(x))/(a*sqrt(c))

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.31 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {2 \, \sqrt {-c} \arctan \left (\frac {{\left (\sqrt {b x + a} \sqrt {-c} - \sqrt {-{\left (b x + a\right )} c + 2 \, a c}\right )}^{2}}{2 \, a c}\right )}{a c} \]

[In]

integrate(1/x/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x, algorithm="giac")

[Out]

-2*sqrt(-c)*arctan(1/2*(sqrt(b*x + a)*sqrt(-c) - sqrt(-(b*x + a)*c + 2*a*c))^2/(a*c))/(a*c)

Mupad [B] (verification not implemented)

Time = 2.35 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.19 \[ \int \frac {1}{x \sqrt {a+b x} \sqrt {a c-b c x}} \, dx=-\frac {\left (\ln \left (\frac {\sqrt {c\,\left (a-b\,x\right )}-\sqrt {a\,c}}{\sqrt {a+b\,x}-\sqrt {a}}\right )-\ln \left (\frac {{\left (\sqrt {c\,\left (a-b\,x\right )}-\sqrt {a\,c}\right )}^2}{{\left (\sqrt {a+b\,x}-\sqrt {a}\right )}^2}-c\right )\right )\,\sqrt {a\,c}}{a^{3/2}\,c} \]

[In]

int(1/(x*(a*c - b*c*x)^(1/2)*(a + b*x)^(1/2)),x)

[Out]

-((log(((c*(a - b*x))^(1/2) - (a*c)^(1/2))/((a + b*x)^(1/2) - a^(1/2))) - log(((c*(a - b*x))^(1/2) - (a*c)^(1/
2))^2/((a + b*x)^(1/2) - a^(1/2))^2 - c))*(a*c)^(1/2))/(a^(3/2)*c)